package longshu.data.domain;

import lombok.experimental.Accessors;
import longshu.data.common.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * @author LongShu
 * @since 2018-02-03
 */
@lombok.Getter
@lombok.Setter
@lombok.ToString
@Accessors(chain = true)
@lombok.NoArgsConstructor
@Table(name = "student")
public class Student extends BaseEntity {

    /**
     * 学号
     */
    @Column(name = "number", unique = true, nullable = false, length = 32)
    private String number;

    /**
     * 姓名
     */
    @Column(name = "name", nullable = false, length = 16)
    private String name;

    /**
     * 出生日期
     */
    @Column(name = "birth")
    @Temporal(TemporalType.DATE)
    private Date birth;

    /**
     * 备注
     */
    @Column(name = "remark", length = 512)
    protected String remark;

    private static final long serialVersionUID = 1L;

}
